<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">

function tipsOrderList(skuid,model,gander,size){
	var vote_arr = document.getElementsByName("ppid[]");
	var starttime=$("#starttime_hide").val();
	var endtime=$("#endtime_hide").val();

	$.post("/factorydetail/tipsOrderList", {"starttime":starttime,
	"endtime":endtime,"sku_id":skuid,"model":model,"gender":gander,"size":size,},function(data){
		$("#endorderlistst").html(data);
		$('#endorderform').modal('show');	
	})
}

</script>
<title>工厂订单列表</title>
<body class="withvernav">
<style type="text/css">
.child_subject td{padding:0px 3px !important;font-size:12px;color:#666666}
.tit td{border-top:1px solid #ccc;}
.selltr td{border-bottom:0px;padding:4px 5px !important;}
</style>
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent">
<div class="pageheader notab">
  <h1 class="pagetitle">订单多批量统计提醒</h1>
  <span class="pagedesc"></span>
  
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
<div id="basicform" class="subcontent">
   <!--搜索栏-->
          <div>
          
         <div style="clear: both"></div>
         <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
   </div>
     <input type='hidden' name='starttime_hide' id='starttime_hide' value="{{$starttime}}">
     <input type='hidden' name='endtime_hide' id='endtime_hide' value="{{$endtime}}">
    <form class="stdform stdform2" method="get" id="search" action="/factorydetail/ordercounts">
    <input type='hidden' name='if_csv' id='if_csv'>
    <input type='hidden' name='csvlist' id='csvlist'>
    <input type='hidden' name='orderby' id='orderby'>   
      <div class="tableoptions"> 搜索条件：时间段内一周派单超过
        <input type="text"  name="one_week_orders" style="width:30px;padding:4px;3px;text-align:center;" value="{{$one_week_orders}}"/>
        件，且两周派单超过
        <input type="text"  name="two_week_orders" style="width:30px;padding:4px;3px;text-align:center;" value="{{$two_week_orders}}"/>件    
               

      &nbsp;订单时间段：<input type="text"  name="starttime" value="{{$starttime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       SKU: <input type="text" name="sku" id="sku" class="width100" value="{{$goodsku}}" placeholder="商品编号" />
      
                           
&nbsp;
        <button class="btn btn-primary" id="searchbtn">Search</button>
     
      </div>
    </form>
    <!--搜索栏结束-->
<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
<thead>
  <tr class="lbbt">
    <td bgcolor="#FEFFF1" width="30"><a onClick="allSelect('ppid[]')">全选</a></td>
    <td bgcolor="#FEFFF1" width="70">商品编号</td>
    <td bgcolor="#FEFFF1">商品名称</td>
    <td bgcolor="#FEFFF1" width="60">派单量</td>
    <td bgcolor="#FEFFF1">订单时间段</td>
    <td bgcolor="#FEFFF1" width="90">生产方式</td>
    <td bgcolor="#FEFFF1" width="215">均码信息(版型/性别/尺寸)</td>
    <td bgcolor="#FEFFF1" width="90">生产工厂</td>
    <td bgcolor="#FEFFF1" width="100">操作</td>
  </tr>
</thead>
<tbody >

{{foreach from=$orderlist item=li key=key}}
<tr class="selltr">
    <td align="center"><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.orderId}}" /></td>
    <td valign="middle" style="position:relative;">{{$li.goods_sku}}</td>
    <td valign="middle" style="position:relative;"><div style=" float:left; border:1px solid #CCC; margin-right:10px;">
    	{{if $li.local_url}}<a href="/{{$li.local_url}}" target="_blank"> <img src="{{$li.thumb_url}}" height="50"></a>{{else}} <img src="{{$li.thumb_url}}" height="50">{{/if}}</div><div style="margin-left:10px;">  {{$li.skuName}}
       <!--<br>{{$li.mabangorderid}}-->
    </div></td>
    
    <td valign="middle">{{$li.sku_count}}</td>
    <td valign="middle">{{$starttime}} 至 {{$endtime}}</td>
    <td class="cz">{{if $li.custom==1}}均码{{/if}}
         {{if $li.custom==2}}定制{{/if}}
         {{if $li.custom==3}}配件{{/if}}</td>
         <td>    	
        {{if $li.model==1}} 欧美{{/if}}
        {{if $li.model==2}} 亚洲{{/if}}
        {{if $li.model==0}} 未选择{{/if}} / 
      {{if $li.gender1==1}} 男{{/if}}
        {{if $li.gender1==2}} 女{{/if}}
         {{if $li.gender1==3}} 通用{{/if}}
        {{if $li.gender1==0}} 未选择{{/if}}
        /
        {{if $li.size==25}} XXS{{/if}}
        {{if $li.size==30}} XS{{/if}}
        {{if $li.size==35}} S{{/if}}
        {{if $li.size==40}} M{{/if}}
        {{if $li.size==45}} L{{/if}}
        {{if $li.size==50}} XL{{/if}}
        {{if $li.size==55}} XXL{{/if}}
        {{if $li.size==60}} XXXL{{/if}}
         {{if $li.size==0}} 未选择{{/if}}</td>
    <td  class="cz">{{$li.factoryl}}</td>
    <td  class="cz"><a href="javascript:tipsOrderList('{{$li.goods_sku}}','{{$li.model}}','{{$li.gender1}}','{{$li.size}}')"><u>详细订单</u></a></td>
</tr> 
{{/foreach}}
{{if $orderlist eq null}}
<tr><td colspan="9" align="center" bgcolor="#fff">没有找到符合条件的数据哦，请尝试更改查询条件重新搜索！</td></tr> 
{{/if}}
</tbody>
</table>
  <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
</div>
</div>

<!-- 模态框（Modal）批量标完成 -->
<form action="/factory/ajaxbutton?op=batchendorder"  method="post" name="batchendorderST" id="batchendorderST">
  <div class="modal fade" id="endorderform" tabindex="-1" role="dialog" aria-labelledby="sendorderform" aria-hidden="true">
    <div class="modal-dialog" style="width:840px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sendorderform"> 具体订单列表  </h4>
        </div>
        <div class="modal-body">
         <span id="errshow"></span>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <div style="width:100%;height:300px;overflow:auto; border:0px solid;">
           <span id="endorderlistst">
           </span>
           <span id="fileinput"></span>
          </div>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  </form>
  
  

</body>
</html>